<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>卡车类客车信息详情</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<form id="formSet1">
	<table class="sq-formTable">
        <tbody>
            <tr>
            	<td width="80%" valign="top">
            		<div class="sqPanel">
                        <div class="sqPanel_head">
                        	<div class="label">产品详细信息</div>
                        </div>
                    </div>
                        <div class="fieldset1 tabel_col clearFix">
                        	<div class="fieldBox col_33">
	                        	<div class="label">产品名称</span></div>
				                <div class="field">
				                	<span name="prdNm" id="prdNm">&nbsp;</span>
				                </div>
				            </div>
                        	<div class="fieldBox col_33">
	                        	<div class="label">产品类型</span></div>
				                <div class="field">
				                	<span name="prdTypCdNm" id="prdTypCdNm">&nbsp;</span>
				                </div>
				            </div>
                        	<div class="fieldBox col_33">
	                        	<div class="label">产品所属厂商</span></div>
				                <div class="field">
				                	<span name="mfrNm" id="mfrNm">&nbsp;</span>
				                </div>
				            </div>
                        	<div class="fieldBox col_33">
	                        	<div class="label">产品品牌</span></div>
				                <div class="field">
				                	<span name="brCdNm" id="brCdNm">&nbsp;</span>
				                </div>
				            </div>
                        	<div class="fieldBox col_33">
	                        	<div class="label">设备状态 (是否启用)</span></div>
				                <div class="field">
				                	<span name="isValidNm" id="isValidNm">&nbsp;</span>
				                </div>
				            </div>
				            <div class="fieldBox col_33">
				            	<div class="label">建议价格(元)</div>
				                <div class="field">
				                	<span name="guidePcDouble" id="guidePcDouble">&nbsp;</span>
				                </div>
				            </div>
				            <div class="fieldBox col_33">
				            	<div class="label">产品型号</div>
				                <div class="field">
				                	<span name="prdMdl" id="prdMdl">&nbsp;</span>
				                </div>
				            </div>
				            <!-- <div class="fieldBox col_33">
				            	<div class="label">产品种类</div>
				                <div class="field">
				                	<span name="prdClsCdNm" id="prdClsCdNm">&nbsp;</span>
				                </div>
				            </div> -->
				            <div id="dyncBizdiv">
			                	<%-- <jsp:include page="prdTkInfoDetailDynamicPage.jsp"></jsp:include> --%>
			                </div>
			                <div class="fieldBox col_33">
				            	<div class="label">子产品建议价格(元)</div>
				                <div class="field">
				                	<span name="guidePcDouble_tkBus" id="guidePcDouble_tkBus">&nbsp;</span>
				                </div>
				            </div>
				            <div class="fieldBox col_100">
				            	<div class="label">备注</div>
				                <div class="field">
				                	<span name="prdRem" id="prdRem">&nbsp;</span>
				                    <input name="pId" id="pId" type="hidden" value="${id }">
				                </div>
				            </div>
                        </div>
            	</td>
            </tr>
		</tbody>
	</table>
	</form>
</body>

<script type="text/javascript">
var _bizTypCd = '${bizTypCd}';
var _bizCd = '${bizCd}';
var _sGrpCd = '${sGrpCd}';
var _sCode = '${sCode}';
var _prdId = '${prdId}';

$(function () {
	var form = $("#formSet1").ligerForm({
		validate: true
    });
	var _url = '<%=path%>/product/prdTkInfo/toTkDynamicFldDetailPage.do';
	//刷新动态组件
	var wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
    $("#dyncBizdiv").load(_url,{bizTypCd:_bizTypCd, bizCd:_bizCd},function(responseText,textStatus){
		wait_dialog.close();
		initData();//加载完组件后初始化数据
    });
	
	setPrdBscInfo();
})
	frameElement.dialog.onCancel = function () {
	     frameElement.dialog.close();
	}

	function setPrdBscInfo(){
		if(!_prdId){
			return;
		}
    	var _url = '<%=path%>/product/prdBscInfo/getById.do';
    	$.ajax({
    		type: 'get',
    		dataType:'json',
    		data:{id:_prdId},
    		url: _url,
    		success:function(msg){
    			 if(msg.success == 1){
    				 setPrdBscInfoData(msg.data);//设置数据
    			 }else{
    				 $.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    			 }
    		}
    	});
   	}
	//设置产品基本信息	
	function setPrdBscInfoData(data){
		$("#prdNm").html(data.prdNm);
		$("#prdTypCdNm").html(data.prdTypCdNm);
		$("#mfrNm").html(data.mfrNm);
		$("#brCdNm").html(data.brCdNm);
		$("#isValidNm").html(data.isValidNm);
		$("#prdMdl").html(data.prdMdl);
		$("#guidePcDouble").html(data.guidePcDouble);
		$("#prdRem").html(data.prdRem);
		//$("#prdClsCdNm").html(data.prdClsCdNm);
	}
	function initData(){
			var id = $("#pId").val();
			if(!id){
				return;
			}
	    	var _url = '<%=path%>/product/prdTkBusInfo/getById.do';
	    	$.ajax({
	    		type: 'get',
	    		dataType:'json',
	    		data:{id:id},
	    		url: _url,
	    		success:function(msg){
	    			 if(msg.success == 1){
	    				 setData(msg.data);//设置数据
	    			 }else{
	    				 $.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
	    			 }
	    		}
	    	});
    	}
	function setData(data){
		$("#carLen").html(data.carLen);
		$("#prdYr").html(data.prdYr);
		$("#outVol").html(data.outVol);
		$("#grboxCfg").html(data.grboxCfg);
		$("#engMdl").html(data.engMdl);
		$("#carStrcCfg").html(data.carStrcCfg);
		$("#carCl").html(data.carCl);
		$("#maxSpd").html(data.maxSpd);
		$("#carMdl").html(data.carMdl);
		$("#othCfg").html(data.othCfg);
		$("#prdCyCdNm").html(data.prdCyCdNm);
		$("#grboxTypCdNm").html(data.grboxTypCdNm);
		$("#seatQtyCdNm").html(data.seatQtyCdNm);
		$("#drvTypCdNm").html(data.drvTypCdNm);
		$("#carStrcCdNm").html(data.carStrcCdNm);
		$("#powerTypCdNm").html(data.powerTypCdNm);
		$("#prdWayCdNm").html(data.prdWayCdNm);
		$("#guidePcDouble_tkBus").html(data.guidePcDouble_tkBus);
	}
	
</script>